﻿@echo off

:: 解决中文乱码
chcp 65001>nul

set host="192.168.8.67"
set user="root"
set serverPath="/data1/docker/projects/smart-audit/"
set projectName="api-0.0.1-SNAPSHOT.jar"

git checkout develop

git pull

echo "========================开始打包========================"
call mvn clean package -pl api -am -DskipTests
echo "========================结束打包========================"

echo "========================开始上传========================"
scp api/target/%projectName% %user%@%host%:%serverPath%%projectName%
echo "========================结束上传========================"

echo "========================开始启动========================"
call ssh %user%@%host% "cd %serverPath% && ./startup.sh"
echo "========================结束启动========================"